#include<bits/stdc++.h>
#define XH(i,a,b) for(int i=a;i<b;++i)
#define XXH(i,a,b) for(int i=a;i>b;--i)
#define LL long long
using namespace std;
int tmpINT; string tmpSTRING; char tmpCHAR; double tmpDOUBLE; LL tmpLONGLONG;

int t,n;

string solve(){
	string ret = "1";
	XH(i , 1 , n){
		tmpCHAR = ret[i-1]+tmpSTRING[i-1]-'0';
		if(tmpCHAR == '0'){
			ret += '1';	
		}else if(tmpCHAR == '1'){
			ret += tmpSTRING[i] == '0'?'0':'1';
		}else if(tmpCHAR == '2'){
			ret += tmpSTRING[i] == '0'?'1':'0';
		}
	}
	return ret;
}

int main(){
	int useless;
	scanf("%d", &t);
	XH(i , 0 , t){
		scanf("%d", &n);
		cin>>tmpSTRING;
		cout<<solve()<<endl;
	}
	
	return 0;
}